package fr.umlv.m2.jee.pmlv.service.subject;

import java.io.Serializable;
import java.util.Date;

import fr.umlv.m2.jee.pmlv.persistence.subject.Comment;
import fr.umlv.m2.jee.pmlv.persistence.subject.Subject;

public class DisplayComment implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Comment comment;
	
	public DisplayComment(Comment comment) {
		this.comment = comment;
	}
	

	/**
	 * Sets the text of the comment.
	 * @param text String that is to be the text of the Comment.
	 */
	public void setText(String text) {
		comment.setText(text);
	}

	/**
	 * Return the text which represents the comment.
	 * @return the text which repreents the comment.
	 */
	public String getText() {
		return comment.getText();
	}

	/**
	 * Sets the date when the comment was posted.
	 * @param post the date that is be the date when the comment was posted.
	 */
	public void setPostedAt(Date postedAt) {
		comment.setPostedAt(postedAt);
	}

	/**
	 * Returns the date when the comment was posted.
	 * @return the time when the comment was posted.
	 */
	public Date getPostedAt() {
		return comment.getPostedAt();
	}

	/**
	 * Sets the subject which is commented.
	 * @param subject the subject that is to be commented.
	 */
	public void setSubject(Subject subject) {
		comment.setSubject(subject);
	}

	/**
	 * Returns the subject whish is commented.
	 * @return the {@link Subject} which is commented.
	 */
	public Subject getSubject() {
		return comment.getSubject();
	}
	

}
